﻿CREATE proc [dbo].[danhmucNXPTung_Them]
@ma_ptnx varchar(255),

@ten_ptnx nvarchar(255)

as
if exists(select * from DM_NX_PhuTung   Where ma_ptnx  =@ma_ptnx   or ten_ptnx =@ten_ptnx    )
begin
select ErrCode=0
end
else
begin
insert into DM_NX_PhuTung (ma_ptnx,ten_ptnx)
				values(@ma_ptnx,@ten_ptnx) 
select ErrCode=1
end